****************************************************************************************************************
**																											  **
** This do file is part of the replication material for the following article: 								  **
**  "Who is afraid of a change? Ideological differences in support for the status quo in direct democracy"    **
** 		Authors: Davide Morisi, Celine Colombo, Andrea De Angelis											  **
** 		Journal: Political Behavior																			  **
**																											  **
** This file reproduces all the tables and figures included in the paper and the online appendix			  **
**																											  **
****************************************************************************************************************

ssc install fre

*Set working directory
*cd "..."

*Open dataset (available in Dataverse)
use "status_quo_dataset.dta", clear 


************************
*RECODING

*DV: change in support for reform between W1 and W2
recode supportW1 11=5 12=., gen(supportW1r)
recode supportW2 11=5 12=., gen(supportW2r)
gen deltasupp = supportW2r-supportW1r
label variable deltasupp "Change in support for reform between W1 and W2"
label de deltasupp -10 "decreased support" 0" no change" 10"increased support"
label values deltasupp deltasupp
fre deltasupp
drop supportW1r supportW2r

*Left-right ideology
*5 categories
recode lr_ideology (1/2=3 "Right") (3=2 "Centre") (4/5=1 "Left") (6=0 "no placement") (7 = 99 "No reply"), gen(lr5cat)
label variable lr5cat "Left-right ideology 5 categories"
*4 categories
recode lr_ideology (1/2=3 "Right") (3=2 "Centre") (4/5=1 "Left") (6=0 "no placement") (7 =.), gen(lr4cat)
label variable lr4cat "Left-right ideology 4 categories"
*3 categories (excluding no placement)
recode lr_ideology (1/2=3 "Right") (3=2 "Centre") (4/5=1 "Left") (6/7 =.), gen(lr3cat)
label variable lr3cat "Left-right ideology 3 categories"
fre lr*cat

*Party identification
recode pid_1all (10=0 "No, no party (independent)") (3 4 5 7 92=3 "Right party") (2 6 93 95 96 99=2 "Other party") (1 8 91 94=1 "Left party") (11=.), gen (pid4cat)
label variable pid4cat "Party identification 4 categories"
fre pid4cat // 4 categories
recode pid_1all (10=0 "No, no party (independent)") (3 4 5 7 92=3 "Right party") (6 93 95 96 99=2 "Other party") (1=1 "PD") (8 91 94=4 "Left party (not PD)") (2=5 "M5S") (11=.), gen (pid6cat)
label variable pid6cat "Party identification 6 categories"
fre pid6cat // 6 categories

*Knowledge index
recode knowref1 (. 1 3 4 = 0 "Wrong") (2=1 "Correct"), gen(knowref1r)
recode knowref2 (. 1 2 4 = 0 "Wrong") (3=1 "Correct"), gen(knowref2r)
recode knowref3 (. 1 3 = 0 "Wrong") (2=1 "Correct"), gen(knowref3r)
recode knowref4 (. 2 3 = 0 "Wrong") (1=1 "Correct"), gen(knowref4r)
recode knowpol1 (1 2 4 = 0 "Wrong") (3=1 "Correct"), gen(knowpol1r)
recode knowpol2 (1 3 4 = 0 "Wrong") (2=1 "Correct"), gen(knowpol2r)
recode knowpol3 (2 3 4 = 0 "Wrong") (1=1 "Correct"), gen(knowpol3r)
recode knowpol4 (2 3 4 = 0 "Wrong") (1=1 "Correct"), gen(knowpol4r)
recode knowpol5 (2 3 4 = 0 "Wrong") (1=1 "Correct"), gen(knowpol5r)
recode knowpol6 (1 2 4 = 0 "Wrong") (3=1 "Correct"), gen(knowpol6r)
recode knowpol7 (2 3 4 = 0 "Wrong") (1=1 "Correct"), gen(knowpol7r)
gen know_index=knowref1r+knowref2r+knowref3r+knowref4r ///
	+knowpol1r+knowpol2r+knowpol3r+knowpol4r+knowpol5r+knowpol6r+knowpol7r
gen know_index01 = know_index/11
tab know_index
label variable know_index01 "Additive index of political knowledge"
label define know 0"Minimum knowledge" 1"Maximum knowledge"
label values know_index01 know
tab know_index01 // rescaled from 0 to 1
recode know_index (0/7=1 "low knowledge") (8/12=2 "high knowledge"), gen(know_dum)
label variable know_dum "Political knowledge median split"
fre know_dum // median split in 2 categories

*Education
recode education (1 2 3 = 1 "Lower-Lower intermediate") (4=2 "High school - Tecnical diploma") (5=3 "High school - Liceum")(6/11 = 4 "University"), gen(edu4)
fre edu4

*Trust in the government
recode trust_gov 11/12=., gen(trust)
label variable trust "Trust in the government recoded"
label values trust trust
fre trust

*Socio-demographic covariates
global demo "i.gender i.age_cat i.edu4"


*******************************************
*******************************************
*TABLES AND FIGURES INCLUDED IN THE PAPER


*Table 2. Effects of treatment conditions on support for reform
eststo clear
eststo: reg deltasupp i.group
eststo: reg deltasupp i.group##c.lr3cat
esttab using "~Table2.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* 0.1 ** 0.05 *** 0.01)  scalars (r2) title("Table2. Effects of treatment conditions on support for reform") wide compress noeqlines replace


*Figure 1. Average marginal effects of treatments by ideology categories 
fre group
*left-wing
eststo clear
reg deltasupp i.group##c.lr3cat
eststo mar1: margins, dydx(2.group) at(lr3cat==1) level(90) post
reg deltasupp i.group##c.lr3cat
eststo mar2: margins, dydx(3.group) at(lr3cat==1) level(90) post
reg deltasupp i.group##c.lr3cat
eststo mar3: margins, dydx(5.group) at(lr3cat==1) level(90) post
reg deltasupp i.group##c.lr3cat
eststo mar4: margins, dydx(4.group) at(lr3cat==1) level(90) post
reg deltasupp i.group##c.lr3cat
eststo mar5: margins, dydx(6.group) at(lr3cat==1) level(90) post
coefplot (mar1) (mar2) (mar3) (mar4) (mar5), yline(0) level(90) vert title("Left-wing voters") scheme(default) name(left, replace)
*right-wing
eststo clear
reg deltasupp i.group##c.lr3cat
eststo mar1: margins, dydx(2.group) at(lr3cat==3) level(90) post
reg deltasupp i.group##c.lr3cat
eststo mar2: margins, dydx(3.group) at(lr3cat==3) level(90) post
reg deltasupp i.group##c.lr3cat
eststo mar3: margins, dydx(5.group) at(lr3cat==3) level(90) post
reg deltasupp i.group##c.lr3cat
eststo mar4: margins, dydx(4.group) at(lr3cat==3) level(90) post
reg deltasupp i.group##c.lr3cat
eststo mar5: margins, dydx(6.group) at(lr3cat==3) level(90) post
coefplot (mar1) (mar2) (mar3) (mar4) (mar5), yline(0) level(90) vert title("Right-wing voters") scheme(default) name(right, replace)
*combined
graph combine left right, ycommon


*Figure 2. Effects of change cue by ideology and knowledge
*left-wing
reg deltasupp i.group##c.lr3cat##c.know_index01
margins, dydx(2.group) at(know_index01==(0(0.2)1) lr3cat==1) level(90)
marginsplot, yline(0) scheme(default) name(know_left, replace) recastci(rline) ciopts(lpattern(dash)) recast(line) title("Left-wing voters")
*right-wing
reg deltasupp i.group##c.lr3cat##c.know_index01
margins, dydx(2.group) at(know_index01==(0(0.2)1) lr3cat==3) level(90)
marginsplot, yline(0) scheme(default) name(know_right, replace) recastci(rline) ciopts(lpattern(dash)) recast(line) title("Right-wing voters")
*combined
graph combine know_left know_right


*******************************************
*******************************************
*APPENDIX A


*Table A1. Randomization checks
fre group
eststo clear
eststo: mlogit group i.lr4cat i.pid4cat i.gender i.age_cat i.edu4 trust, b(1)
esttab using "~TableA1a.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Table A1. Randomization checks") compress noeqlines replace


*Table A2. Effects of treatment conditions on support for reform (models with covariates)
eststo clear
eststo: reg deltasupp i.group $demo i.pid4cat trust
eststo: reg deltasupp i.group##c.lr3cat $demo i.pid4cat trust
esttab using "~TableA2.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* 0.1 ** 0.05 *** 0.01)  scalars (r2) title("TableA2. Effects of treatment conditions on support for reform (models with covariates)") wide compress noeqlines replace


*TableA3. Effects of treatment conditions on support for reform (alternative DV)
recode supportW1 11=5 12=., gen(supportW1r)
recode supportW2 11=5 12=., gen(supportW2r)
label values supportW1r support
label values supportW2r support
tab1 supportW1r supportW2r
eststo clear
eststo: reg supportW2r i.group supportW1r
eststo: reg supportW2r i.group supportW1r $demo i.pid4cat trust
eststo: reg supportW2r i.group##c.lr3cat supportW1r
eststo: reg supportW2r i.group##c.lr3cat supportW1r $demo i.pid4cat trust
esttab using "~TableA3.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("TableA3. Alternative DV") wide compress noeqlines replace


*Table A4. Average marginal effects based on interaction models in Table 2, Table A1 and Table A2
*Panel A (Table 2 and Table A2)
*no covariates (Table 2)
eststo clear
reg deltasupp i.group##c.lr3cat
eststo: margins, dydx(group) at(lr3cat==1) post
reg deltasupp i.group##c.lr3cat
eststo: margins, dydx(group) at(lr3cat==2) post
reg deltasupp i.group##c.lr3cat
eststo: margins, dydx(group) at(lr3cat==3) post
esttab using "~TableA4_panelA1.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Panel A. Average marginal effects based on Table 2") compress noeqlines replace
*with covariates (Table A2)
eststo clear
reg deltasupp i.group##c.lr3cat $demo i.pid4cat trust
eststo: margins, dydx(group) at(lr3cat==1) post
reg deltasupp i.group##c.lr3cat $demo i.pid4cat trust
eststo: margins, dydx(group) at(lr3cat==2) post
reg deltasupp i.group##c.lr3cat $demo i.pid4cat trust
eststo: margins, dydx(group) at(lr3cat==3) post
esttab using "~TableA4_panelA2.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Panel A. Average marginal effects based on Table 2") compress noeqlines replace
*Panel B (Table A3)
*no covariates
eststo clear
reg supportW2r i.group##c.lr3cat supportW1r
eststo: margins, dydx(group) at(lr3cat==1) post
reg supportW2r i.group##c.lr3cat supportW1r
eststo: margins, dydx(group) at(lr3cat==2) post
reg supportW2r i.group##c.lr3cat supportW1r
eststo: margins, dydx(group) at(lr3cat==3) post
esttab using "~TableA4_panelB1.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Panel B. Average marginal effects based on Table A1") compress noeqlines replace
*with covariates
eststo clear
reg supportW2r i.group##c.lr3cat supportW1r $demo i.pid4cat trust
eststo: margins, dydx(group) at(lr3cat==1) post
reg supportW2r i.group##c.lr3cat supportW1r $demo i.pid4cat trust
eststo: margins, dydx(group) at(lr3cat==2) post
reg supportW2r i.group##c.lr3cat supportW1r $demo i.pid4cat trust
eststo: margins, dydx(group) at(lr3cat==3) post
esttab using "~TableA4_panelB2.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Panel B. Average marginal effects based on Table A1") compress noeqlines replace


*Table A5. Effects of treatment conditions on support for reform (left-right categorical)
eststo clear
eststo: reg deltasupp i.group##i.lr4cat
eststo: reg deltasupp i.group##i.lr4cat $demo i.pid4cat trust
esttab using "~TableA5.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* 0.1 ** 0.05 *** 0.01)  scalars (r2) title("TableA4. Treatment effects (left-right categorical)") wide compress noeqlines replace


*Table A6. Average marginal effects of treatments by ideology categories (based on Table A5)
*no covariates
eststo clear
reg deltasupp i.group##i.lr4cat
eststo: margins 1.lr4cat, dydx(group) post
reg deltasupp i.group##i.lr4cat
eststo: margins 2.lr4cat, dydx(group) post
reg deltasupp i.group##i.lr4cat
eststo: margins 3.lr4cat, dydx(group) post
reg deltasupp i.group##i.lr4cat
eststo: margins 0.lr4cat, dydx(group) post
esttab using "~TableA6a.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Table A6 no covariates") compress noeqlines replace
*with covariates
eststo clear
reg deltasupp i.group##i.lr4cat $demo i.pid4cat trust
eststo: margins 1.lr4cat, dydx(group) post
reg deltasupp i.group##i.lr4cat $demo i.pid4cat trust
eststo: margins 2.lr4cat, dydx(group) post
reg deltasupp i.group##i.lr4cat $demo i.pid4cat trust
eststo: margins 3.lr4cat, dydx(group) post
reg deltasupp i.group##i.lr4cat $demo i.pid4cat trust
eststo: margins 0.lr4cat, dydx(group) post
esttab using "~TableA6b.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Table A6 with covariates") compress noeqlines replace


*Table A7. Effects of treatment conditions on support for reform (adjusting for DK responses or excluding DK responses)
*Dummies for DK responses
gen supportW1_dk = 0
replace supportW1_dk = 1 if supportW1==11
gen supportW2_dk = 0
replace supportW2_dk = 1 if supportW2==11
*Excluding DK from DV
recode supportW1 11/12=., gen(supportW1a)
recode supportW2 11/12=., gen(supportW2a)
gen deltasupp2 = supportW2a-supportW1a
label values deltasupp2 deltasupp
ta deltasupp2
eststo clear
eststo: reg deltasupp i.group i.supportW1_dk i.supportW2_dk
eststo: reg deltasupp i.group##c.lr3cat i.supportW1_dk i.supportW2_dk
eststo: reg deltasupp2 i.group
eststo: reg deltasupp2 i.group##c.lr3cat
esttab using "~TableA7.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* 0.1 ** 0.05 *** 0.01)  scalars (r2) title("TableA7. Adjusting for DK or excluding DK") wide compress noeqlines replace


*Table A8. Average marginal effects of treatments by ideology categories (based on Table A7, excluding DK from DV)
eststo clear
reg deltasupp2 i.group
eststo: margins, dydx(group) post
reg deltasupp2 i.group##c.lr3cat
eststo: margins, dydx(group) at(lr3cat==1) post
reg deltasupp2 i.group##c.lr3cat
eststo: margins, dydx(group) at(lr3cat==2) post
reg deltasupp2 i.group##c.lr3cat
eststo: margins, dydx(group) at(lr3cat==3) post
esttab using "~TableA8.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Average marginal effects based on Table A7, models 3 and 4") compress noeqlines replace


*Table A9. Effects of treatment conditions on support for reform (interactions with party identification)
fre pid4cat pid6cat
eststo clear
*PID 4 categories
eststo: reg deltasupp i.group##i.pid4cat
eststo: reg deltasupp i.group##i.pid4cat $demo i.lr4cat trust
*PID 6 categories
eststo: reg deltasupp i.group##i.pid6cat
eststo: reg deltasupp i.group##i.pid6cat $demo i.lr4cat trust
esttab using "~TableA9.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* 0.1 ** 0.05 *** 0.01)  scalars (r2) title("TableA9. Treatment effects (with PID)") wide compress noeqlines replace


*Table A10. Average marginal effects based on Table A9, no covariates
*Panel A - 4 categories of PID
fre pid4cat
eststo clear
reg deltasupp i.group##i.pid4cat
eststo: margins, dydx(group) at(pid4cat==1) post
reg deltasupp i.group##i.pid4cat
eststo: margins, dydx(group) at(pid4cat==2) post
reg deltasupp i.group##i.pid4cat
eststo: margins, dydx(group) at(pid4cat==3) post
reg deltasupp i.group##i.pid4cat
eststo: margins, dydx(group) at(pid4cat==0) post
esttab using "~TableA10_panelA.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Panel A. Average marginal effects based on Table A9 PID 4 cat") compress noeqlines replace
*Panel B - 6 categories of PID
fre pid6cat
eststo clear
reg deltasupp i.group##i.pid6cat
eststo: margins, dydx(group) at(pid6cat==1) post
reg deltasupp i.group##i.pid6cat
eststo: margins, dydx(group) at(pid6cat==4) post
reg deltasupp i.group##i.pid6cat
eststo: margins, dydx(group) at(pid6cat==5) post
reg deltasupp i.group##i.pid6cat
eststo: margins, dydx(group) at(pid6cat==2) post
reg deltasupp i.group##i.pid6cat
eststo: margins, dydx(group) at(pid6cat==3) post
reg deltasupp i.group##i.pid6cat
eststo: margins, dydx(group) at(pid6cat==0) post
esttab using "~TableA10_panelB.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("Panel B. Average marginal effects based on Table A9 PID 6 cat") compress noeqlines replace


*TableA11. Effects of treatment conditions on support for reform (interactions with index of political knowledge)
fre know_index01 know_dum
eststo clear
eststo: reg deltasupp i.group##c.lr3cat##c.know_index01
eststo: reg deltasupp i.group##c.lr3cat##c.know_index01 $demo i.pid4cat trust
esttab using "~TableA11.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* 0.1 ** 0.05 *** 0.01)  scalars (r2) title("TableA11 - knowledge index") wide compress noeqlines replace


*TableA12. Effects of treatment conditions on support for reform (interactions with categories of political knowledge)
eststo clear
eststo: reg deltasupp i.group##c.lr3cat##i.know_dum
eststo: reg deltasupp i.group##c.lr3cat##i.know_dum $demo i.pid4cat trust
esttab using "~TableA12.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* 0.1 ** 0.05 *** 0.01)  scalars (r2) title("TableA12 - knowledge categories") wide compress noeqlines replace


*Figure A1. Effects of change cue by ideology and knowledge dummy
reg deltasupp i.group##c.lr3cat##i.know_dum
margins know_dum, dydx(2.group) at(lr3cat==1) level(90) post
marginsplot, yline(0) scheme(default) name(knowdum_left, replace)
reg deltasupp i.group##c.lr3cat##i.know_dum
margins know_dum, dydx(2.group) at(lr3cat==3) level(90) post
marginsplot, yline(0) scheme(default) name(knowdum_right, replace) 
graph combine knowdum_left knowdum_right


*Table A13. Effects of the change cue by ideology and knowledge of government’s position
fre knowpol1
recode knowpol1 (1 4=1 "Gov against/DK") (3=2 "Gov in favour") (2=3 "Gov divided"), gen(gov3)
fre gov3
reg deltasupp i.group##i.lr4cat##i.gov3
margins 1.lr4cat 3.lr4cat, dydx(2.group) at(gov3=(1(1)3))


*Figure A2. Effects of change cue in the presence of information
fre group lr3cat
*pro argument
eststo clear
reg deltasupp ib3.group##c.lr3cat
eststo mar1: margins, dydx(5.group) at(lr3cat==1) level(90) post
reg deltasupp ib3.group##c.lr3cat
eststo mar2: margins, dydx(5.group) at(lr3cat==3) level(90) post
coefplot (mar1) (mar2), yline(0) level(90) vert title("Effect of change cue when pro argument present") scheme(default) name(proarg1, replace)
*con argument
eststo clear
reg deltasupp ib4.group##c.lr3cat
eststo mar1: margins, dydx(6.group) at(lr3cat==1) level(90) post
reg deltasupp ib4.group##c.lr3cat
eststo mar2: margins, dydx(6.group) at(lr3cat==3) level(90) post
coefplot (mar1) (mar2), yline(0) level(90) vert title("Effect of change cue when con argument present") scheme(default) name(conarg1, replace)
graph combine proarg1 conarg1


*Table A14. Regressions of response time on assignment to treatment interacted by ideology categories
egen p5 = pctile(timeatt), p(5)
egen p95 = pctile(timeatt), p(95)
gen timeatt1 = timeatt if timeatt<p95 // trimmed at 95pctile
*Panel A. Average treatment effects
eststo clear
eststo: reg timeatt i.group
eststo: reg timeatt i.group $demo
eststo: reg timeatt1 i.group
eststo: reg timeatt1 i.group $demo
esttab using "~TableA14_A.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("TableA14. Effects on response time - Panel A") wide compress noeqlines replace
*Panel B. Interactions with ideology
eststo clear
eststo: reg timeatt i.group##c.lr3cat
eststo: reg timeatt i.group##c.lr3cat $demo
eststo: reg timeatt1 i.group##c.lr3cat
eststo: reg timeatt1 i.group##c.lr3cat $demo
esttab using "~TableA14_B.rtf", ///
b(%6.3f) se(%6.3f) starlevels(* .1 ** .05 *** .01)  scalars (r2) title("TableA14. Effects on response time - Panel B") wide compress noeqlines replace


*Figure A3. Distribution of the dependent variable in the control group
hist deltasupp if group==1, percent discrete normal


*correlations lr - pid
fre lr4cat pid4cat
tab lr4cat pid4cat, col chi2 V
tab lr3cat pid4cat if lr3cat!=2 & pid4cat!=0 & pid4cat!=2, col chi2 V

